Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: link to original image file #206

Merged
merged 4 commits into from
Dec 8, 2021

Conversation

bedgarone
Copy link
Contributor

@bedgarone bedgarone commented Nov 23, 2021

Description

The goal of this issue #194 is to provide a way for the user to access the Capture's image in its original size, by opening it in a new tab or copying its url.

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce?

  • Enhancement

Issue

What is the current behavior?
Each capture row pops up an optimized image (resized to improve performance) and there isn't a path to reach the original image in its full size.

What is the new behavior?
The user is now able to either copy the original image's url or open the image in a new tab.

Steps taken:

  • Added a new item to the Capture Data's array, which adds another item (the original image url) in the right panel;
  • Set that itemps 'copy' property to true, so that a copy item appears and enables the user to copy the url;
  • Added the same link to the original image over the optimized image, with absolute positioning.

Screenshots

imagem

imagem

imagem

@bedgarone
Copy link
Contributor Author

bedgarone commented Nov 24, 2021

@nmcharlton these were simple implementations of the discussed ideas. I would need some opinion on the link over the image, isn't it too distracting? Perhaps the link in the right panel is sufficient?
Let me know if any of these need changes. Also, if the link over the image is going ahead, some refactor is needed in the style as I merely used strings while I suspect some items should use theme values (like the color, etc.).

@bedgarone bedgarone marked this pull request as ready for review November 25, 2021 21:10
@bedgarone bedgarone requested a review from a team as a code owner November 25, 2021 21:10
@nmcharlton
Copy link
Collaborator

@bedgarone This looks great! The link and copy option in the side panel as you've proposed work well.
We can remove the link from the image; I agree it's a bit distracting.

Nice work.

src/components/CaptureDetailDialog.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@nmcharlton nmcharlton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work

@nmcharlton nmcharlton merged commit 89f628d into Greenstand:master Dec 8, 2021
@bedgarone bedgarone deleted the feature/full_image_link branch December 21, 2021 15:44
mitia-anah pushed a commit to mitia-anah/treetracker-admin-client that referenced this pull request Feb 1, 2022
Ny-Rianala pushed a commit to Ny-Rianala/treetracker-admin-client that referenced this pull request Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resized webp images served in Admin panel: please add link to orignial file
2 participants